Skip to content

feat: --all-platforms option for dbc list - #467

Open
wbeardall wants to merge 2 commits into
columnar-tech:mainfrom
wbeardall:feat/list-platforms
Open

feat: --all-platforms option for dbc list#467
wbeardall wants to merge 2 commits into
columnar-tech:mainfrom
wbeardall:feat/list-platforms

Conversation

@wbeardall

@wbeardall wbeardall commented Aug 22, 2026

Copy link
Copy Markdown

Follow-up to PR #466

Problem

With the new cross-platform install options proposed in PR #466, the following scenario introduces potential user confusion risk:

  1. On a fresh machine, with no installed drivers, the user executes dbc install postgres --platform <not-my-platform>
  2. Later, they want to know if they have a Postgres driver that they can use with ADBC
  3. They run dbc list. Current dbc list does not distinguish between the presence of drivers for the host platform vs other platforms, and so prints the following:
DRIVER     VERSION LEVEL LOCATION                                            
                                                                             
postgresql 1.12.0  user  /path/to/my/adbc/drivers
  1. They trust that they can then run ADBC Postgres, and become irate when, at runtime, they do not have a host-compatible lib!

Proposal

We propose to:

  1. Add filter-by-default to dbc list, so that only drivers which are compatible with the host machine show up in the printed summary
  2. Add an opt-in --all-platforms flag to dbc list, which adds an additional PLATFORM column to the printed table, containing the platform tuple for each available driver. Host-compatible drivers are marked with (*) (e.g. linux_amd64 (*))

defaultPath configurations

dbc <driver>.toml config files accept two shared path configurations:

driverMap:

[Driver.shared]
linux_amd64 = /path/to/driver

defaultPath:

[Driver]
shared = /path/to/driver

driverMap is trivial; however, for the defaultPath pattern, we assume that, in absence of explicit platform information, the linked driver is host-compatible.

## Tests

config/driver_test.go

  • TestLoadDriverFromManifest (extended)
    • Asserts HasPlatform / PlatformTuples for platform-map manifests
  • TestDriverMapDefaultPath (new)
    • String sharedHasPlatform true for any platform
    • UsesDefaultPath true, PlatformTuples empty

cmd/dbc/list_test.go

  • TestListHidesNonHostPlatformDriver
    • Cross-platform install invisible in default dbc list
  • TestListAllPlatformsShowsCrossPlatformDriver
    • Visible with PLATFORM column; (*) only when tuple is host
  • TestListAllPlatformsMarksHostDriver
    • Host install shows PlatformTuple() + " (*)" under --all-platforms
  • TestListAllPlatformsJSONIncludesPlatform
    • JSON platform field populated when --all-platforms is set

…to host platform, so standard install use-case is unaffected. WASM ops do not expose platform selection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant